import request from '@/utils/request'

export function addDevice(data) {
    return request({
      url: '/device/add',
      method: 'post',
      data
    })
}

export function updateDevice(data) {
    return request({
      url: '/device/update',
      method: 'post',
      data
    })
}

export function deleteDevice(id) {
    return request({
      url: `/device/delete/${id}`,
      method: 'post',
    })
}

export function selectType() {
    return request({
      url: '/device-type/all',
      method: 'get',
    })
}


export function page(data) {
    return request({
      url: '/device/page',
      method: 'post',
      data
    })
  }

  export function send(data) {
    return request({
      url: '/send/cmd',
      method: 'post',
      data
    })
  }